<template>
  <a :href="Props.GAME_ID | gameDetailFilter">
    <div class="newGame">
      <img class="label" src="../assets/img/youxinbisai@2x.png" alt="" />
      <div class="game_con" :style="{backgroundImg}">
        <p class="game_title">
          {{Props.NICK_NAME}}  刚刚创立了一场模拟比赛
        </p>
        <p class="game_name">
          {{Props.GAME_NAME}}
        </p>
        <span class="go_other">速速围观 ></span>
      </div>
    </div>
  </a>
</template>

<script>
import { gameDetailFilter } from '../filters/userFilter'

export default {
  name: 'newGame',
  props: {
    Props: Object
  },
  filters: {
    gameDetailFilter
  },
  created () {
    console.info(this.Props)
  },
  computed: {
    backgroundImg () {
      return { backgroundImage: `url(${this.Props.BACK_PIC_URL})` }
    }
  }
}
</script>

<style lang='less' scoped>
@import "./common/mixins.less";
.newGame {
  .moment;
  height: 187px;
  position: relative;
}

.label {
    position: absolute;
    left: -2px;
    top: 31px;
    width: 27px;
    height: 118px;
}
.game_con {
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  overflow: hidden;
  .game_title {
    .ellipsis();
    margin-top: 46px;
    text-align: center;
    padding: 0 20px;
    color: #58240E;
    margin-bottom: 4px;
    @media screen {
      @media (max-width: 400px) {
        font-size: 14px;/*no*/
      }
      @media (min-width: 400px) {
        font-size: 16px;/*no*/
      }
    }
  }
  .game_name {
    .flexLayout();
    color: #FFF;
    background-image: url(../assets/img/hong.png);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: left 4px;
    margin: 0 25px 6px;
    height: 47px;
    font-weight: bold;
    @media screen {
      @media (max-width: 400px) {
        font-size: 22px;/*no*/
      }
      @media (min-width: 400px) {
        font-size: 24px;/*no*/
      }
    }
  }
  .go_other {
    .go_other_font;
    background-color: #7A45A7;
  }
}
</style>
